package com.sto.stoapp.thread;

import android.os.Environment;

import java.io.File;

public class DeleteApkThread extends Thread {
	/** SD卡根目录 */
	public static final String SDPATH = Environment
			.getExternalStorageDirectory() + File.separator;

	@Override
	public void run() {
		super.run();

		if(null==SDPATH){
			return;
		}

		try {
			File f = new File(SDPATH);
			if (f != null) {
				for (File ff : f.listFiles()) {
					if (ff.getName().endsWith(".apk")) {
						ff.delete();
					}
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
